package com.group01.community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 区域表
 * </p>
 *
 * @author iuoly
 * @since 2022-07-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysArea extends Model<SysArea> {

    private static final long serialVersionUID=1L;

    /**
     * 唯一主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 城市编码
     */
    private Integer code;

    /**
     * 城市名称
     */
    private String name;

    /**
     * 城市父ID
     */
    @TableField("parentId")
    private Integer parentId;

    /**
     * 城市等级(0:省,1:市,2:县)
     */
    private Integer level;

    /**
     * 功能类型(1:角色认证地点开通;0:未开通)
     */
    private Integer type;

    /**
     * 服务状态
     */
    private Integer servicestate;

    /**
     * 逻辑删除 0正常 1 删除
     */
    private Integer deleteFlag;

    /**
     * 地区范围
     */
    private Integer region;

    @TableField(exist = false)
    List<SysArea> areas;
    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
